package com.emperor.misc.app;

import java.util.Map;

import org.apache.log4j.Logger;

import com.emperor.core.app.AppConstant;
import com.emperor.core.app.AppCtrl;

public class LoginAppCtrl implements AppCtrl {
	public static final String LOGIN_CTRL = "login.ctrl";
	public static final String LOGIN_FORM = "login.form";
	public static final String LOGIN_SUCCESS = "login.success";
	public static final String LOGIN_FAILED = "login.failed";
	
	public static Logger log = Logger.getLogger(LoginAppCtrl.class);
	
	public void doProcess(Map<String, Object> params) {
		if (params == null) {
			log.error("Param is null");
		} else if (params.get(AppConstant.ACTION).equals(LoginAppCtrl.LOGIN_FORM)) {
			LoginAppForm form = new LoginAppForm(params);
			form.open();	
		}
	}
}